const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const path = require('path');

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  productionSourceMap: false,
  configureWebpack: (config) => {
    let plugins = [
      new MonacoWebpackPlugin()
    ];
    config.plugins = [...config.plugins, ...plugins];
  },
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src/'))
      .set('#', resolve('src/components'))
      .set('%', resolve('src/res'))
  },
  pluginOptions: {
    quasar: {
      theme: 'mat',
      rtlSupport: true,
      importAll: true
    }
  },
  transpileDependencies: [
    /[\\\/]node_modules[\\\/]quasar-framework[\\\/]/
  ],
};
